$(document).ready(function() {  
  
    myPassword      = "webstuffshare";  
    fieldPassword   = $('.field-password');  
    shieldPassword  = $('.the-password');  
  
    $('.the-username').mouseover(function() {  
                if(shieldPassword.css('display') == "none")  
                    $(this).addClass('the-username-focus');  
                })  
            .mouseout(function() {  
                $(this).removeClass('the-username-focus');  
            })  
            .click(function() {  
                shieldPassword.slideDown();  
                fieldPassword.focus();  
            });  
  
    $(document).keyup(function(e) {  
  
        if(e.keyCode == 27){  
  
            if(fieldPassword.attr('class') == "field-password")  
                shieldPassword.slideUp();  
    }  
  
    });  
  
    $('.the-form').submit(function() {  
  
        if(fieldPassword.val() != myPassword) {  
  
            options = {distance: 10, times: 2}  
  
            $('.login').effect('shake', options, 35, function() {  
                fieldPassword.focus();  
            });  
  
        } else {  
  
            fieldPassword.val('')  
             .blur()  
             .addClass('field-password-loading')  
             .animate(  {backgroundPosition: "(0 0)"},  
                            1000,  
                            function() {  
                                alert('Login Successfully, Now you can try again.');  
                            });  
        }  
  
        return false;  
  
    });  
  
    $('.try-again').click(function() {  
  
        shieldPassword.slideUp();  
  
        fieldPassword.removeClass('field-password-loading')  
            .animate( { backgroundPosition: "(-188px 0)" } );  
  
    });  
});  